﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tunnel
{
    class Global
    {
        private static string user="研发测试";

        private static string userID = "admin";

        private static string Role = "管理员";

        private static bool plc1status = true;
        private static bool plc2status = true;

        private static Dictionary<string,bool> plcStatus=new Dictionary<string, bool>();

        public static string User
        {
            get
            {
                return user;
            }

            set
            {
                user = value;
            }
        }

        public static string Role1
        {
            get
            {
                return Role;
            }

            set
            {
                Role = value;
            }
        }

        public string CommandID
        {
            get
            {
                string guid = Guid.NewGuid().ToString("N");
                string datetimestring = DateTime.Now.ToString("yyyyMMddhhmmss");
                return datetimestring + guid;
            }            
        }

        public static string UserID
        {
            get
            {
                return userID;
            }

            set
            {
                userID = value;
            }
        }

        public static bool Plc1status
        {
            get
            {
                return plc1status;
            }

            set
            {
                plc1status = value;
            }
        }

        public static bool Plc2status
        {
            get
            {
                return plc2status;
            }

            set
            {
                plc2status = value;
            }
        }

        public static Dictionary<string, bool> PlcStatus
        {
            get
            {
                return plcStatus;
            }

            set
            {
                plcStatus = value;
            }
        }
    }
}
